Carbon


CloseCPort

Header: Quickdraw.h Carbon status: Unsupported

Closes a color graphics port.

void CloseCPort (
    CGrafPtr port
);
port

A pointer to a CGrafPort structure.

DISCUSSION

Normally, your application does not need to call the CloseCPort function. The Window Manager calls this function to close or dispose of a window, and the DisposeGWorld function calls it to dispose of an offscreen graphics world containing a color graphics port.

The CloseCPort function disposes of the visRgn, clipRgn, bkPixPat, pnPixPat, fillPixPat, and grafVars handles. It also disposes the graphics port’s pixel map, but it does not dispose the pixel map’s color table. If you have placed your own color table into the pixel map, either dispose of it before calling CloseCPort or store another reference.

SPECIAL CONSIDERATIONS

The CloseCPort function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.

CARBON NOTES

Carbon applications should use CreateNewPort and DisposePort to open and close graphics ports.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)